package com.deng.theone.service.impl;

import com.alibaba.fastjson2.JSON;
import com.deng.theone.mapper.TestMapper;
import com.deng.theone.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Service
public class TestServiceImpl implements TestService {
    @Autowired
    TestMapper mapper;


    @Override
    public List<String> getList() {
        List<HashMap<String, String>> userList = mapper.getAllUserList();
        ArrayList<String> list = new ArrayList<>();
        list.add(JSON.toJSONString(userList));
        return list;
    }
}
